package com.irssproject.app.service.lectorRSS.iface;

import com.irssproject.app.entitats.*;
import com.irssproject.app.web.action.JSONWrappers.FeedsByTopic;
import com.irssproject.app.web.action.JSONWrappers.ItemsByTopic;
import java.util.List;

public interface SubscriptionsService {

    public void insertSubscription(User usuari, String feedLink, String label, Boolean fromRecommendation) throws Exception;

    public void deleteSubscription(Long idSubscripcio);

    public List<Subscription> getSubscriptionsList(User usuari, Boolean fromRecommendation);

    public List<Label> getLabelsList(User usuari);

    public List<Label> getLabelsList();

    public List<Feed> getFeedsList();

    public void markItemAsRead(Long idLectura);

    public List<Reading> showReadingsOnInterval(Long idSubscripcio, Integer toElement) throws Exception;

    public List<Reading> showAllReadingsOnInterval(Long idSubscripcio, Integer toElement) throws Exception;

    public List<Reading> showLikedReadingsOnInterval(User usuari, Integer toElement) throws Exception;

    public void refreshSubscription(Long idSubscripcio);

    public Integer getSubscriptionItemsNumber(Subscription subscripcio);

    public Subscription getSubscriptionById(Long id);

    public Reading getReadingById(Long idLectura);

    public boolean setReadingReadOrUnread(Long idLectura);

    public boolean setReadingLikedOrUnliked(Long idLectura);

    public void setAllReadingsRead(Long idSubscripcio);

    public void setReadingRelevance(Reading lectura);

    public List<Feed> getFeedsLikeList(String likeNom);

    public Item getItemById(Long id);

    public List<Label> getLabelLikeName(String terme);

    public List<User> getUsersSubscribed(User connectedUser);

    public List<Topic> getTopicsSubscribed(User connectedUser);
    
    public List<FeedsByTopic> getFeedsLstByTopic(User user, String topic);

    public List<ItemsByTopic> getItemsLstByTopic(User connectedUser, String topic);
}
